home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -serious- / programming / other / mesa / mesa-glut / glue / createheader.in next >
Text File  |  2000-02-23  |  1KB  |  30 lines

  1. #include <stddef.h>
  2. #include <stdio.h>
  3.  
  4. #include <exec/libraries.h>
  5. #include "../include/library_gl@TARGET@.h"
  6.  
  7. #define LIB struct Library
  8. #define TASK struct Task
  9.  
  10. int main(int argc, char **argv)
  11. {
  12.   int extra = 0;
  13.  
  14.   printf ("/* This header has been generated by the create_header tool.\n   DO NOT EDIT! */\n\n");
  15.  
  16.   printf ("#define MesaGL@TARGET@BASE_FLAGS %ld\n", offsetof(LIB, lib_Flags));
  17.   printf ("#define MesaGL@TARGET@BASE_NEGSIZE %ld\n", offsetof(LIB, lib_NegSize));
  18.   printf ("#define MesaGL@TARGET@BASE_POSSIZE %ld\n", offsetof(LIB, lib_PosSize));
  19.   printf ("#define MesaGL@TARGET@BASE_VERSION %ld\n", offsetof(LIB, lib_Version));
  20.   printf ("#define MesaGL@TARGET@BASE_REVISION %ld\n", offsetof(LIB, lib_Revision));
  21.   printf ("#define MesaGL@TARGET@BASE_IDSTRING %ld\n", offsetof(LIB, lib_IdString));
  22.   printf ("#define MesaGL@TARGET@BASE_SUM %ld\n", offsetof(LIB, lib_Sum));
  23.   printf ("#define MesaGL@TARGET@BASE_OPENCNT %ld\n", offsetof(LIB, lib_OpenCnt));
  24.   printf ("#define MesaGL@TARGET@BASE_LIBRARY %ld\n", sizeof(LIB));
  25.  
  26.   printf ("#define MesaGL@TARGET@BASE_SIZEOF (MesaGL@TARGET@BASE_C_PRIVATE + %ld)\n",
  27.       (sizeof (struct MesaGL@TARGET@base) - offsetof (struct MesaGL@TARGET@base, mgl@TARGET@_seg_list) - 4) + extra * 6);
  28.   return 0;
  29. }
  30.